package com.example.sofa_module;

import com.example.common.mvvm.BaseEntity;
import com.example.common.mvvm.model.BaseRepository;
import com.example.network_sdk.RetrofitManager;

import io.reactivex.Observable;
import io.reactivex.annotations.NonNull;
import io.reactivex.functions.Function;

public class TabRepository extends BaseRepository {
    public Observable<BaseEntity> requestData(){
        Observable<SofaFeedEntity> requestSofaData = RetrofitManager.getInstance().getRetrofit().create(ApiService.class).requestSofaData();
        return requestSofaData.map(new Function<SofaFeedEntity, BaseEntity>() {
            @Override
            public BaseEntity apply(@NonNull SofaFeedEntity sofaFeedEntity) throws Exception {
                return sofaFeedEntity;
            }
        });
    }
    public void like(){

    }
}
